package com.hsnn.medstgmini.base.std.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.springframework.format.annotation.DateTimeFormat;

import com.hsnn.medstgmini.util.ParseDate;

@Entity
@Table(name="std_compprofile_log")
public class StdCompprofileLog implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String logId;//日志id
	private String compprofileId;// 企业资质ID
	private String compId;// 企业ID
	private String profileCode;// 资质编号
	private String profileName;// 企业资质名称
	private String profileType;// 企业资质类型（参考企业资质类型字典表，有"其他"类型）
	private Date profileStarttime;// 企业资质有效期始
	private String profileStarttimeStr;
	private Date profileEndtime;// 企业资质有效期止
	private String profileEndtimeStr;
	private String profilePicAddr;// 资质图片地址
	private String profilePicShortcutAddr;// 资质图片缩略图地址
	private Integer status;// 状态0.停用1.启用
	private String remarks;// 备注
	private String updUser;// 最后更新人
	private Date updDatetime;// 最后更新时间
	private String updDatetimeStr;
	
	
	@Id
	@Column(name="log_id",length=36)
	public String getLogId() {
		return logId;
	}
	public void setLogId(String logId) {
		this.logId = logId;
	}
	
	@Column(name = "compprofile_id" ,length=36)
	public String getCompprofileId() {
		return compprofileId;
	}
	
	public void setCompprofileId(String compprofileId) {
		this.compprofileId = compprofileId;
	}
	
	@Column(name = "comp_id" ,length=36)
	public String getCompId() {
		return compId;
	}
	public void setCompId(String compId) {
		this.compId = compId;
	}
	
	@Column(name = "profile_code" ,length=36)
	public String getProfileCode() {
		return profileCode;
	}
	public void setProfileCode(String profileCode) {
		this.profileCode = profileCode;
	}
	
	@Column(name = "profile_name" ,length=36)
	public String getProfileName() {
		return profileName;
	}
	public void setProfileName(String profileName) {
		this.profileName = profileName;
	}
	
	@Column(name = "profile_type" ,length=36)
	public String getProfileType() {
		return profileType;
	}
	public void setProfileType(String profileType) {
		this.profileType = profileType;
	}
	
	@Column(name = "profile_starttime" ,length=36)
	@DateTimeFormat(pattern="yyyy-MM-dd")
	public Date getProfileStarttime() {
		return profileStarttime;
	}
	public void setProfileStarttime(Date profileStarttime) {
		this.profileStarttime = profileStarttime;
	}
	
	@Column(name = "profile_endtime" ,length=36)
	@DateTimeFormat(pattern="yyyy-MM-dd")
	public Date getProfileEndtime() {
		return profileEndtime;
	}
	public void setProfileEndtime(Date profileEndtime) {
		this.profileEndtime = profileEndtime;
	}
	
	@Column(name = "profile_pic_addr" ,length=36)
	public String getProfilePicAddr() {
		return profilePicAddr;
	}
	public void setProfilePicAddr(String profilePicAddr) {
		this.profilePicAddr = profilePicAddr;
	}
	
	@Column(name = "profile_pic_shortcut_addr" ,length=36)
	public String getProfilePicShortcutAddr() {
		return profilePicShortcutAddr;
	}
	public void setProfilePicShortcutAddr(String profilePicShortcutAddr) {
		this.profilePicShortcutAddr = profilePicShortcutAddr;
	}
	
	@Column(name = "status" ,length=36)
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	@Column(name = "remarks" ,length=36)
	public String getRemarks() {
		return remarks;
	}
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	
	@Column(name = "upd_user" ,length=36)
	public String getUpdUser() {
		return updUser;
	}
	public void setUpdUser(String updUser) {
		this.updUser = updUser;
	}
	
	@Column(name = "upd_datetime" ,length=36)
	public Date getUpdDatetime() {
		return updDatetime;
	}
	public void setUpdDatetime(Date updDatetime) {
		this.updDatetime = updDatetime;
	}
	
	@Transient
	public String getProfileStarttimeStr() {
		if(null != profileStarttime ){
			profileStarttimeStr = ParseDate.parseShortFormat(profileEndtime);
		}
		return profileStarttimeStr;
	}
	public void setProfileStarttimeStr(String profileStarttimeStr) {
		this.profileStarttimeStr = profileStarttimeStr;
	}
	
	@Transient
	public String getProfileEndtimeStr() {
		if(null != profileEndtime ){
			profileEndtimeStr = ParseDate.parseShortFormat(profileEndtime);
		}
		return profileEndtimeStr;
	}
	public void setProfileEndtimeStr(String profileEndtimeStr) {
		this.profileEndtimeStr = profileEndtimeStr;
	}
	
	@Transient
	public String getUpdDatetimeStr() {
			if(null != updDatetime ){
				updDatetimeStr = ParseDate.parseFullFormat(updDatetime);
			}
		return updDatetimeStr;
	}
	public void setUpdDatetimeStr(String updDatetimeStr) {
		this.updDatetimeStr = updDatetimeStr;
	}

}
